<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String IP = request.getRemoteAddr();
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>发工资页面</title>
<style>
</style>
</head>
<body>
<div>
	<form action="wages/payConfirm.action" method="post" id="form">
	<table border="1">
		<tr>
			<th>工号</th><th>姓名</th>
		</tr>
		<c:forEach items="${managerList }" var="item">
			<tr>
				<td><input type="checkbox" name="iUserId" class="iUserId" value="${item.iUserId }" />${item.iUserId }</td>
				<td>${item.sName }</td>
			</tr>
		</c:forEach>
		<tr>
			<td colspan="3"><input type="button" value="确认提交" onclick="pay()"/></td>
		</tr>
	</table>
	</form>
</div>
</body>
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript">
	function pay(){
		if(0 == $(".iUserId:checked").length){
			alert("请选择确认发工资的员工");
			return false;
		}else if(1 != $(".iUserId:checked").length){
			alert("只能选择一个员工");
			return false;
		}
		document.getElementById("form").submit();
	}
</script>
</html>